export function batch(type){
  const confirmInfo = {
    del:{
      title:'确定删除选中搭配吗？',
      content:'刪除后将不会出现在主款详情页'
    },
    open:{
      title:'确定启用选中搭配吗？',
      content:'启用后将有可能出现在主款详情页'
    },
    prohibit:{
      title:'确定禁用选中搭配吗？',
      content:'禁用后将不会出现在主款详情页'
    }
  }
  this.$confirm({
    title: confirmInfo[type].title,
    content: confirmInfo[type].title,
    cancelText: '暂不',
    onOk: res => {
      this.$destroyAll();
      this.spinning = true
      if(type == 'del'){
        this.batchDelete()
      }else{
        this.batchUpdate(type== 'open'? 2 : 3)
      }
    },
    onCancel() {}
  })
}